#ifndef __MS5803__H
#define __MS5803__H
#include "stm32l1xx_hal.h"
#include "i2c.h"
//MS5803 command define
#define MS5803_ADDR  0X76
#define MS5803_RESET 0X1E
#define MS5803_CONV_PRESSURE 0X48 //default use 24bit
#define MS5803_CONV_TEMP     0X58//default  use 24bit
#define MS5803_READ          0X00
#define MS5803_RESERVED      0XA0
#define MS5803_C1            0XA2
#define MS5803_C2            0XA4
#define MS5803_C3            0XA6
#define MS5803_C4            0XA8
#define MS5803_C5            0XAA
#define MS5803_C6            0XAC
#define MS5803_CRC           0XAE
typedef void (*pfunc)(uint8_t,uint8_t,void*,uint16_t);
//variable define
//Send reset command
static uint8_t MS5803_Get_Adjust_Args(void);
static uint8_t crc4_itu(uint8_t *data, uint8_t length);
extern void MS5803_Init(void);
extern float MS5803_Get_Temperature(void);
extern float MS5803_Get_Pressure(void);
extern void  MS5803_Test(void);
#endif